<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>走马灯</title>
</head>

<body>


    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css" />
    <!-- import JavaScript -->
    <script src="https://unpkg.com/element-plus"></script>



    <div id="app">
        <el-button>{{ message }}</el-button>

        <el-carousel indicator-position="outside">
            <el-carousel-item v-for="item in list" :key="item">
                <a :href="item.src" :target="item.target" :title="item.title">
                    <img :src="item.img">
                </a>
            </el-carousel-item>
        </el-carousel>




    </div>
    <script>
        const App = {
            setup() {
                const message = Vue.ref("1111");
                return {
                    message,
                    list: [
                        { url: '#1', target: '_blank', title: '22', img: 'https://sofile.cn/wp-content/uploads/img_test/1.jpg' },
                        { url: '#1', target: '11', title: '22', img: 'https://sofile.cn/wp-content/uploads/img_test/2.jpg' },
                        { url: '#1', target: '11', title: '22', img: 'https://sofile.cn/wp-content/uploads/img_test/3.jpg' }
                    ]


                };
            },
        };
        const app = Vue.createApp(App);
        app.use(ElementPlus);
        app.mount("#app");
    </script>
</body>

</html>